<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<div class="aui-fullpage">
  <div class="aui-header-1">
    <lv-group lvGutter="8px" class="back-icon" (click)="back()">
      <i lv-icon="aui-widget-datepicker-previous" [lvColorState]="true"></i>
      <h1>{{ data.roleName }}</h1>
    </lv-group>
    <button lv-button (click)="modify()" [disabled]="data.is_default" class="modify-style">{{'common_modify_label'|i18n}}</button>
  </div>
  <aui-rbac-overview-tag [title]="data?.roleName" [article]="data?.roleDescription"></aui-rbac-overview-tag>
  <div class="aui-block aui-paginator-container" style="padding: 0">
    <lv-tabs lvType="card">
      <lv-tab lvTitle="{{'system_permissions_label' | i18n}}">
        <ng-template lv-tab-lazy>
          <aui-role-auth-tree [data]="data"></aui-role-auth-tree>
        </ng-template>
      </lv-tab>
      <lv-tab lvTitle="{{'system_associated_users_label' | i18n}}">
        <ng-template lv-tab-lazy>
          <aui-associated-users [data]="data"></aui-associated-users>
        </ng-template>
      </lv-tab>
    </lv-tabs>
  </div>
</div>
